home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / GZIP107S.ZIP;1 / GZIP107.TAR / gzip-1.0.7 / tailor.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-18  |  4.5 KB  |  208 lines

  1. /* tailor.h -- target dependent definitions
  2.  * Copyright (C) 1992-1993 Jean-loup Gailly.
  3.  * This is free software; you can redistribute it and/or modify it under the
  4.  * terms of the GNU General Public License, see the file COPYING.
  5.  */
  6.  
  7. /* The target dependent definitions should be defined here only.
  8.  * The target dependent functions should be defined in tailor.c.
  9.  */
  10.  
  11. /* $Id: tailor.h,v 0.14 1993/03/18 18:14:56 jloup Exp $ */
  12.  
  13. #if defined(__MSDOS__) && !defined(MSDOS)
  14. #  define MSDOS
  15. #endif
  16.  
  17. #ifdef MSDOS
  18. #  ifdef __GNUC__
  19.      /* DJGPP version 1.09+ on MS-DOS.
  20.       * The DJGPP 1.09 stat() function must be upgraded before gzip will
  21.       * fully work.
  22.       * No need for DIRENT, since <unistd.h> defines POSIX_SOURCE which
  23.       * implies DIRENT.
  24.       */
  25. #    define near
  26. #  else
  27. #    define MAXSEG_64K
  28. #    ifdef __TURBOC__
  29. #      define NO_UTIME
  30. #    else /* MSC */
  31. #      define HAVE_SYS_UTIME_H
  32. #      define NO_UTIME_H
  33. #    endif
  34. #  endif
  35. #  define PATH_SEP2 '\\'
  36. #  define PATH_SEP3 ':'
  37. #  define MAX_PATH_LEN  128
  38. #  define NO_MULTIPLE_DOTS
  39. #  define MAX_EXT_CHARS 3
  40. #  define Z_SUFFIX "z"
  41. #  define NO_CHOWN
  42. #  define PROTO
  43. #  define STDC_HEADERS
  44. #  define NO_SIZE_CHECK
  45. #  define casemap(c) tolow(c) /* Force file names to lower case */
  46. #  include <io.h>
  47. #  define OS_CODE  0x00
  48. #  define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
  49. #  if !defined(NO_ASM) && !defined(ASMV)
  50. #    define ASMV
  51. #  endif
  52. #else
  53. #  define near
  54. #endif
  55.  
  56. #ifdef OS2
  57. #  define PATH_SEP2 '\\'
  58. #  define PATH_SEP3 ':'
  59. #  define MAX_PATH_LEN  260
  60. #  ifdef OS2FAT
  61. #    define NO_MULTIPLE_DOTS
  62. #    define MAX_EXT_CHARS 3
  63. #    define Z_SUFFIX "z"
  64. #  endif
  65. #  define NO_CHOWN
  66. #  define PROTO
  67. #  define STDC_HEADERS
  68. #  define HAVE_SYS_UTIME_H
  69. #  define NO_UTIME_H
  70. #  define DIRENT
  71. #  define casemap(c) tolow(c)
  72. #  include <io.h>
  73. #  define OS_CODE  0x06
  74. #  define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
  75. #endif
  76.  
  77. #ifdef __EMX__
  78. #  define EXPAND(argc,argv) {_response(&argc, &argv); _wildcard(&argc, &argv);}
  79. #endif
  80.  
  81. #ifndef MAXSEG_64K
  82. #  define fcalloc(items,size) malloc((unsigned)(items)*(unsigned)(size))
  83. #  define fcfree(ptr) free(ptr)
  84. #else
  85. #  ifdef __TURBOC__
  86. #    include <alloc.h>
  87. #    define DYN_ALLOC
  88.      /* Turbo C 2.0 does not accept static allocations of large arrays */
  89.      void * fcalloc (unsigned items, unsigned size);
  90.      void fcfree (void *ptr);
  91. #  else /* MSC */
  92. #    include <malloc.h>
  93. #    define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize))
  94. #    define fcfree(ptr) hfree(ptr)
  95. #  endif
  96. #endif
  97.  
  98. #if defined(VAXC) || defined(VMS)
  99. #  define PATH_SEP ']'
  100. #  define PATH_SEP2 ':'
  101. #  define SUFFIX_SEP ';'
  102. #  define NO_MULTIPLE_DOTS
  103. #  define Z_SUFFIX "-z"
  104. #  define RECORD_IO 1
  105. #  define casemap(c) tolow(c)
  106. #  define OS_CODE  0x02
  107. #  define OPTIONS_VAR "GZIP_OPT"
  108. #  define STDC_HEADERS
  109. #  define NO_UTIME
  110. #  include <file.h>
  111. #  ifdef VAXC
  112. #    define NO_FCNTL_H
  113. #    define unlink delete
  114. #    include <unixio.h>
  115. #  endif
  116. #endif
  117.  
  118. #ifdef AMIGA
  119. #  define PATH_SEP2 ':'
  120. #  define STDC_HEADERS
  121. #  define casemap(c) tolow(c) /* Force file names to lower case */
  122. #  define OS_CODE  0x01
  123. #  define ASMV
  124. #  ifdef __GNUC__
  125. #    define DIRENT
  126. #    define HAVE_UNISTD_H
  127. #    define RETSIGTYPE int
  128. #  else /* SASC */
  129. #    define NO_STDIN_FSTAT
  130. #    define SYSDIR
  131. #    define NO_SYMLINK
  132. #    define NO_CHOWN
  133. #    define NO_FCNTL_H
  134. #    include <fcntl.h> /* for read() and write() */
  135. #    define direct dirent
  136.      extern void _expand_args(int *argc, char ***argv);
  137. #    define EXPAND(argc,argv) _expand_args(&argc,&argv);
  138. #  endif
  139. #endif
  140.  
  141. #if defined(ATARI) || defined(atarist)
  142. #  ifndef STDC_HEADERS
  143. #    define STDC_HEADERS
  144. #    define HAVE_UNISTD_H
  145. #    define DIRENT
  146. #  endif
  147. #  define ASMV
  148. #  define OS_CODE  0x05
  149. #  ifdef TOSFS
  150. #    define NO_SYMLINK
  151. #    define NO_MULTIPLE_DOTS
  152. #    define MAX_EXT_CHARS 3
  153. #    define Z_SUFFIX "z"
  154. #    define NO_CHOWN
  155. #  endif
  156. #endif
  157.  
  158. #ifdef MACOS
  159. #  define OS_CODE  0x07
  160. #endif
  161.  
  162. #ifdef WIN32
  163. #  define OS_CODE  0x0b
  164. #endif
  165.  
  166. #ifdef TOPS20
  167. #  define OS_CODE  0x0a
  168. #endif
  169.  
  170. #ifndef unix
  171. #  define NO_PTY /* no pseudo ttys */
  172. #endif
  173.  
  174.     /* Common defaults */
  175.  
  176. #ifndef OS_CODE
  177. #  define OS_CODE  0x03  /* assume Unix */
  178. #endif
  179.  
  180. #ifndef PATH_SEP
  181. #  define PATH_SEP '/'
  182. #endif
  183.  
  184. #ifndef casemap
  185. #  define casemap(c) (c)
  186. #endif
  187.  
  188. #ifndef OPTIONS_VAR
  189. #  define OPTIONS_VAR "GZIP"
  190. #endif
  191.  
  192. #ifndef Z_SUFFIX
  193. #  define Z_SUFFIX ".z"
  194. #endif
  195. #define Z_LEN strlen(Z_SUFFIX)
  196.  
  197. #ifndef EXPAND
  198. #  define EXPAND(argc,argv)
  199. #endif
  200.  
  201. #ifndef RECORD_IO
  202. #  define RECORD_IO 0
  203. #endif
  204.  
  205. #ifndef SET_BINARY_MODE
  206. #  define SET_BINARY_MODE(fd)
  207. #endif
  208.